package org.example.buysystem.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.buysystem.entity.Icon;
import org.example.buysystem.entity.Standard;
import org.example.buysystem.mapper.IconMapper;
import org.example.buysystem.mapper.StandardMapper;
import org.springframework.stereotype.Service;

@Service
public class StandardService extends ServiceImpl<StandardMapper, Standard> {
    public void deleteAll(int goodId) {
        // 删除指定商品 ID 下的所有规格
        QueryWrapper<Standard> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("good_id", goodId);
        this.remove(queryWrapper);
    }
}
